<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-12-19
 * Time: 11:48
 */

namespace app\index\controller;


use app\common\controller\HomeBase;
class Skilltype extends HomeBase
{

    /**
     * 根据类型值  获取 类型里面包含的内容
     */
    public function getSkillForStatus()
    {
        $params = input();
        if(array_key_exists("st_type",$params) && $params['st_type'] != ''){
            $st_type = $params['st_type'];//类型值
            $data = \app\common\model\SkillType::getAllInfoForStatus($st_type);
            if ($data) {
                return json(['code' => 200, 'msg' => $data]);
            }else {
                return json(['code' => 301, 'msg' => '暂无数据']);
            }
        } else {
            return json(['code' => 300, 'msg' => '参数缺少']);
        }

    }

}